<script setup lang="ts">
import { onMounted, reactive } from 'vue'

// 定义页面
definePage({
  style: {
    navigationStyle: 'default',
    navigationBarTitleText: '关于',
  },
})

// 状态参数
const state = reactive({
  version: '',
})

onMounted(() => {
  const info = uni.getSystemInfoSync()
  state.version = info.appVersion
})
</script>

<template>
  <view>
    <view class="logo">
      <image class="image" src="/static/logo.png" />
      <view class="version">
        <view>当前版本</view>
        <view>{{ state.version }}</view>
      </view>
    </view>
    <view class="info">
      <view>
        这是一个使用 vue3 + ts + nutui-uniapp 搭建的 uni-app
        示例，包含完整登录与鉴权功能，针对 H5、APP 与小程序进行了适配。
      </view>
      <view>
        源码地址：<a
          href="https://gitee.com/darkwinoom/uni-app-scaffold"
          target="_blank"
        >
          https://gitee.com/darkwinoom/uni-app-scaffold
        </a>
      </view>
    </view>
  </view>
</template>

<style lang="scss" scoped>
  page {
    background-color: #fff;
  }
  .logo {
    margin: 80rpx 0 40rpx;
    text-align: center;
    .image {
      width: 150rpx;
      height: 150rpx;
    }
    .version {
      font-size: 28rpx;
      line-height: 1.5;
      margin-top: 15rpx;
    }
  }
  .info {
    padding: 20rpx;
    line-height: 2;
  }
</style>
